package com.spica.platform.user.mapper;

import com.spica.platform.base.model.SysMenu;
import com.spica.platform.db.mapper.BaseMapper;
import com.spica.platform.user.model.SysRoleMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * 角色菜单mapper
 */
@Mapper
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {

	/**
	 * 根据
	 * @param roleId
	 * @param menuId
	 * @return
	 */
	int delete(@Param("roleId") Long roleId, @Param("menuId") Long menuId);

	List<SysMenu> selectSysMenusByRoleIds(@Param("roleIds") Set<Long> roleIds, @Param("type") Integer type);

	List<SysMenu> selectSysMenusByRoleCodes(@Param("roleCodes") Set<String> roleCodes, @Param("type") Integer type);
}
